#this is the DSLR Factory spike project 
#it will create a DSLR object based off of user input

import CanonDslrList


#this object will return a DSLR object based off of user input
def createDslr(cameraRequest, mfr):

    mfr.lower()#set mfr to all lower case letters to help avoid any errors
    
#if the DSLR was manufactured by Canon then see if the factory can create it
    if mfr == "canon":
        #go though all of the sup classes of canon DSLR and find one and return it if it is there
        # if the camera request is for a Canon EOS 5D Mark II then return one
        if cameraRequest == "Canon EOS 5D Mark II": return CanonDslrList.CanonEosFiveDMarkTwo()
        # if the camera request is for a Canon Rebel T1i then return one
        elif cameraRequest == "Canon Rebel T1i": return CanonDslrList.CanonRebelT1I()
        #this line is for testing
        print "canon level reached"
#else if the DSLR was manufactured by Nikon then see if the factory can create it  
    elif mfr == "nikon":
        #go though all of the sup classes of nikon DSLR and find one and return it
        print "nikon level reached"
#else inform the end user about the error
    else:
        raise ValueError('There is no DSLR name "%s".' % cameraRequest)